#include "../Main/Signal.h"
#include "../Main/Sink.h"
#include "../Main/Source.h"
#include "plant_2DSOS_RDM.h"

int main(int argc,char** argv){
	double t_end = 100.0;
	double dt    = 5.0;
	double sysTime  = 0.0;
	double r2;
	double m2;

	plant_2DSOS_RDM wafer(5.0,100,50);
	Sink_ToFile of_r2("Output_r2",t_end,dt);
	Sink_ToFile of_m2("Output_m2",t_end,dt);

	while(sysTime<=t_end){
		r2 = wafer.getR2();
		m2 = wafer.getM2();
		wafer.update(sysTime,610,0.5);
		of_r2.update(sysTime,r2);
		of_m2.update(sysTime,m2);

		sysTime+=dt;
	}
}